﻿using System.Windows;
using ControleRepresentanteSync.Application.SimpleSync;
using ControleRepresentanteSync.Logic.Models;

namespace ControleRepresentanteSync.View.SimpleSync
{
    internal abstract class SearchableContentViewModel<TModel, TItem, TContract> : SimpleSyncContentViewModel<TModel, TItem, TContract>, ISearchableContentViewModel<TModel, TItem, TContract>
        where TItem : ISimpleSycItem<TContract>
        where TModel : Searchable
    {
        public static readonly DependencyProperty RazaoSocialProperty =
            DependencyProperty.Register("RazaoSocial", typeof(string), typeof(SearchableContentViewModel<TModel, TItem, TContract>));
        public static readonly DependencyProperty NomeFantasiaProperty =
            DependencyProperty.Register("NomeFantasia", typeof(string), typeof(SearchableContentViewModel<TModel, TItem, TContract>));
        public static readonly DependencyProperty CidadeProperty =
            DependencyProperty.Register("Cidade", typeof(string), typeof(SearchableContentViewModel<TModel, TItem, TContract>));
        public static readonly DependencyProperty BairroProperty =
            DependencyProperty.Register("Bairro", typeof(string), typeof(SearchableContentViewModel<TModel, TItem, TContract>));

        public string RazaoSocial
        {
            get { return (string)GetValue(RazaoSocialProperty); }
            set { SetValue(RazaoSocialProperty, value); }
        }

        public string Bairro
        {
            get { return (string)GetValue(BairroProperty); }
            set { SetValue(BairroProperty, value); }
        }

        public string Cidade
        {
            get { return (string)GetValue(CidadeProperty); }
            set { SetValue(CidadeProperty, value); }
        }

        public string NomeFantasia
        {
            get { return (string)GetValue(NomeFantasiaProperty); }
            set { SetValue(NomeFantasiaProperty, value); }
        }
    }
}